package org.elec.mac.service;


import org.elec.mac.mapper.SMaterialMapper;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import org.elec.mac.entity.SMaterial;

import java.util.List;

/**
 * @Description:实现类
 * @author 
 * @version 1.0
 * @created 
 */
@Service
public class SMaterialService extends BaseService<SMaterial,SMaterialMapper> implements InitializingBean {

	@Autowired
	private SMaterialMapper sMaterialMapper;
	
	public void afterPropertiesSet() throws Exception {
		this.setBaseMapper(sMaterialMapper);
	}

	public List<SMaterial> getProductMaterialInfo(Integer pid) {
		return this.sMaterialMapper.getProductMaterialInfo(pid);
	}

	public List<SMaterial> getDeviceMaterialInfo(Integer did) {
		return this.sMaterialMapper.getDeviceMaterialInfo(did);
	}

}
